/*
 * src/syntax/get_input_words.c
 *
 * Harry Wei <harryxiyou@gmail.com>
 * 
 * Get input words for syntax analyser.
 */
#include <stdio.h>
#include <unistd.h>
#include <glib.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include "common.h"
#include "cp_ctrl.h"

int init_stack(struct la *ctrl) {
	g_message("enter func %s", __func__);
#if 0
	char buf[CHAR_SIZE];
	memset(buf, '\0', CHAR_SIZE);
	sprintf(buf, "%s", "#");
#endif
	ctrl->ss = g_malloc0(sizeof(struct stack));
	if (NULL == ctrl->ss) {
		g_message("%s -- Allocate Error!", __func__);
		return -1;
	}
	add_element(ctrl, "#");
	add_element(ctrl, "FB");
	add_element(ctrl, "PT");
	add_element(ctrl, "FN");
	add_element(ctrl, "FT");
	g_message("leave func %s", __func__);
	return 0;
}
